<template>
  <div class="tabbar">
    <router-link :to="item.path" active-class="is_actived" v-for="(item,index) in tabbarData" :key="index" class="tabbar-item">
      <div class="tabbar-item">
        <i :class="item.icon" class="tabbar-item-icon"></i>
        <span>{{ item.title }}</span>
      </div>
    </router-link>
  </div>
</template>

<script>
export default {
  name: 'MyTabbar',
  props: {
    tabbarData: {
      Type: Array,
      default: []
    }
  }
}
</script>

<style lang="less" scoped>
.tabbar {
  display: flex;
  justify-content: space-around;
  position: fixed;
  z-index: 1000;
  bottom: 0;
  left: 0;
  right: 0;
  height: 49px;
  align-items: center;
  background-color: #ddd;
  .tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    .tabbar-item-icon {
      margin-bottom: 2px;
    }
  }
}
.is_actived {
  color: #009eef;
}
</style>
